import { IPaginationQuery } from './common.type';

/**
 * 用户实体（响应）
 */
export interface IUser {
  id: string;
  username: string;
  nickname?: string | null;
  email?: string | null;
  mobile?: string | null;
  avatar?: string | null;
  status: number;
  deptId?: string | null;
  description?: string | null;
  createdAt?: string | null;
  updatedAt?: string | null;
}

/**
 * 创建用户请求
 */
export interface ICreateUser {
  username: string;
  password: string;
  nickname?: string;
  email?: string;
  mobile?: string;
  avatar?: string;
  status?: number;
  deptId?: string;
  description?: string;
}

/**
 * 更新用户请求
 */
export interface IUpdateUser {
  nickname?: string;
  email?: string;
  mobile?: string;
  avatar?: string;
  status?: number;
  deptId?: string;
  description?: string;
}

/**
 * 查询用户请求
 */
export interface IQueryUser extends IPaginationQuery {
  username?: string;
  nickname?: string;
  status?: number;
}

/**
 * 分配角色请求
 */
export interface IAssignRoles {
  roleIds: string[];
}

/**
 * 分配岗位请求
 */
export interface IAssignPosts {
  postIds: string[];
}
